import Image

im = Image.open("hurga.png")
sizex,sizey = im.size

count = 0
for i in range(sizex):
	for j in range(sizey):
		pixel = im.getpixel((i,j))
		if pixel != (0,0,0,0):
			count += 1

print count
